﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using olierFrm.DataBase.FrameWork;

namespace olierFrm.MVC
{
    public static class Extensions
    {
        /// <summary>
        /// 增加系统参数
        /// </summary>
        /// <param name="business"></param>
        public static void AddSystemParams(this DefinedSQL sqs)
        {

            if (sqs.FindParamByName("Operator") != null)
            {
                sqs.SetParam("Operator", (System.Web.HttpContext.Current.Session["operator"] == null) ? null : System.Web.HttpContext.Current.Session["operator"]);
                
            }
            if (sqs.FindParamByName("SerialNO") != null)
            {
                sqs.SetParam("SerialNO", (System.Web.HttpContext.Current.Session["SerialNO"] == null) ? null : System.Web.HttpContext.Current.Session["SerialNO"]);
            }
        }
    }
}
